# -*- python -*-
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Import('env')

srpc_hw_libs = ['srpc', 'platform', 'gio', 'imc', 'imc_syscalls']

srpc_hw_obj = env.ComponentObject('srpc_hw.o', 'srpc_hw.c')
srpc_hw_nonbrowser = env.ComponentProgram('srpc_hw_nonbrowser',
                                           srpc_hw_obj,
                                           EXTRA_LIBS=srpc_hw_libs + [
                                               '${PTHREAD_LIBS}',
                                               '${NONIRT_LIBS}'])

node = env.SelUniversalTest(
    'srpc_hw_test.out',
    srpc_hw_nonbrowser,
    sel_universal_flags=['--command_file', env.File('srpc_hw_test.stdin')],
    stdout_golden=env.File('srpc_hw_test.stdout'),
    )
env.AddNodeToTestSuite(node,
                       ['small_tests'],
                       'run_srpc_hw_test')
